set

operator fun ElementAttributes.set(name: String, value: String)
operator fun ElementAttributes.set(name: String, value: String)

Adds a new attribute with the given name and value.

If an attribute with the given name is already specified, its value will be replaced with the new one.

Since

8.0.0

Parameters

name

The name of the attribute to add or alter.

value

The value to set in a string form. Can be empty for boolean attribute names which are always true despite the attribute value.

Throws

if name is empty or blank.